/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved.
 * Author: Huawei OS Kernel Lab
 * Create: Thu Aug 15 16:14:23 2023
 */

#ifndef __LIBLINUX_ASM_SIMD_H
#define __LIBLINUX_ASM_SIMD_H

#include <linux/compiler.h>
#include <linux/irqflags.h>
#include <linux/preempt.h>
#include <linux/types.h>

static __must_check inline bool may_use_simd(void)
{
	return IS_ENABLED(CONFIG_LIBLINUX_KERNEL_MODE_SIMD) && !in_interrupt();
}

#endif /* __LIBLINUX_ASM_SIMD_H */
